import Vue from 'vue'
import VueRouter from 'vue-router'

import Home from '../views/Home/index.vue'
import Login from '../views/Login/index.vue'

import Game from '../views/Home/components/Game/Game.vue'
import Music  from '../views/Home/components/Music/Music.vue'
import New from '../views/Home/components/News/New.vue'

Vue.use(VueRouter);
export default new VueRouter({
    //使用routes配置项配置路由表
    routes:[
        {
            path:"/home",
            component:Home,
            children:[
                //二级路由及多级路由的path两种写法:1.完整的路径  2.只写当前二级路由的字符串地址,不带/
               {
                path:"Game",
                component:Game
               },
               {
                path:"Music",
                component:Music
               },
               {
                path:"New",
                component:New
               }

            ]
        },
        {
            path:"/Login",
            component:Login
        },
        
    ]
})